package com.example.weight.navigation;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.example.weight.R;
import com.example.weight.greenSeasons.compost.CompostRoleSelectActivity;
import com.example.weight.greenSeasons.compost.RoleSelectActivity;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;

public class ShengchanxianchangDuifeiNavigationActivity extends AppCompatActivity {

    private String name, factory;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shengchanxianchang_duifei_nav);
        Intent previousIntent = getIntent();
        name = previousIntent.getStringExtra("name");
        factory = previousIntent.getStringExtra("factory");

        TitleBar titleBar = findViewById(R.id.titleBar);
        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }

            @Override
            public void onTitleClick(View v) {}

            @Override
            public void onRightClick(View v) {}
        });
    }
    public void turnDay(View view) {
        Intent intent =new Intent(ShengchanxianchangDuifeiNavigationActivity.this, CompostRoleSelectActivity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        intent.putExtra("path", "daily");
        startActivity(intent);
    }
    public void turnFacilityCheck(View view) {
        Intent intent =new Intent(ShengchanxianchangDuifeiNavigationActivity.this, RoleSelectActivity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        intent.putExtra("type", "facilityCheck");
        startActivity(intent);
    }

}
